const TokenKey = 'token'
const UserKey = 'user'

export default {
  getUserToken() {
    return wx.getStorageSync(TokenKey)
  },
  saveUserToken(data) {
    wx.setStorageSync(TokenKey, data)
  },
  removeUserToken() {
    wx.clearStorageSync(TokenKey)
  },
  getUserData() {
    return wx.getStorageSync(UserKey)
  },
  saveUserData(data) {
    wx.setStorageSync(UserKey, data)
  },
  removeUserData() {
    wx.clearStorageSync(UserKey)
  }
}
